#include <stdio.h>
#include <stdlib.h>
#include "single_list.h"
int main(int argc, char *argv[])
{
    S_list head = create_list();
    S_node *tmp = NULL;
    S_node *node = NULL;

    int i = 0;
    int j= 0;

    for (i; i < 10; i++)
    {
	printf("please input a number:\n");
	node = create_node();
	scanf("%d", &(node->elem));
	insert_to_tail(head, node);
    }

    for (tmp = head->next; tmp != NULL; tmp = tmp->next)
    {
	printf("%d\n", tmp->elem);
    }

    printf("please input the node you want to delete:\n");
    node = create_node();
    scanf("%d", &(node->elem));
    remove_node(head, node);

    for (tmp = head->next; head != NULL && tmp != NULL; tmp = tmp->next)
    {
	printf("%d\n", tmp->elem);
    }


}

